package com.cwg.dict.stem.model;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;

import org.apache.commons.lang.builder.ToStringBuilder;

@XmlAccessorType(XmlAccessType.FIELD)
public class Section {

	@XmlAttribute(name = "category")
	private StemType	category;

	@XmlAttribute(name = "description")
	private String		description;

	@XmlElement(name = "group")
	private List<Group>	groups	= new ArrayList<Group>();

	public StemType getCategory() {
		return category;
	}

	public String getDescription() {
		return description;
	}

	public List<Group> getGroups() {
		return groups;
	}

	public void setCategory(StemType category) {
		this.category = category;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public void setGroups(List<Group> groups) {
		this.groups = groups;
	}

	@Override
	public String toString() {
		StringBuilder result = new StringBuilder();
		result.append(ToStringBuilder.reflectionToString(this)).append("\n");
		return result.toString();
	}

}
